home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 128 27 / q27.d81 / t.factsheet 128 < prev    next >
Text File  |  2022-08-28  |  5KB  |  119 lines

  1.  
  2.  
  3.                          F A C T S H E E T   1 2 8
  4.  
  5.                               by Fender Tucker
  6.  
  7.  
  8.     I get around fifty newsletters from users' groups every month and quite
  9. often they'll have PEEKs, POKEs and SYSes for the 128 mode listed in them.
  10. In fact, they usually have the same old tips that have been around for
  11. years, like the ESC codes which are listed on page 370 of your System Guide
  12. or page 669 of the Programmer's Reference Guide (Bantam edition).  For this
  13. factsheet I'm going to thumb through the excellent (and unfortunately out
  14. of print) MAPPING THE COMMODORE 128 by Ottis Cowper, Compute! Books, 1986,
  15. and list some of the more interesting things I find.
  16.  
  17. NOTE: When two bytes are listed, they're in lo byte/hi byte format.
  18.  
  19.  (1) Bit 6 of location 1 is connected to the CAPS LOCK key. Some C-64
  20. software will only work if the CAPS LOCK is up (or down). Try it both
  21. ways.
  22.  
  23.  (2) 45/46 - Start of BASIC. To move BASIC up POKE these with lo and hi
  24. byte of new start. You must also POKE a 0 into the location (in Bank 0) one
  25. less than the new start and do a NEW to reset other variables. The same as
  26. 43/44 on the C-64.
  27.  
  28.  (3) 47/48 - SOV pointer in Bank 1. To move variable space in Bank 1 up
  29. (freeing up space for data, for instance) POKE these, then do a CLR.
  30.  
  31.  (4) 57/58 - Top of memory in Bank 1 pointer. To store stuff above
  32. variables, POKE these and do a CLR.
  33.  
  34.  (5) 65/66 - Current DATA line number. If you get an ILLEGAL QNTY or TYPE
  35. MISMATCH when reading DATA, the line shown won't be where the real error
  36. is. PRINTPEEK(65)+26*PEEK(66) to get the real DATA line number.
  37.  
  38.  (6) 186 - Current device number. This is essential for modern programming
  39. to make your program work on any drives between 8 and 29. Every LOADSTAR
  40. program has this line  DV=PEEK(186):IFDV<8THENDV=8  at the beginning and
  41. uses DV instead of 8 in BLOAD, BSAVE, and other disk commands.
  42.  
  43.  (7) 208 - Number of characters in keyboard buffer. Analagous to 198 in the
  44. C-64. POKE this to 0 to keep erroneous keypresses from "carrying over".
  45.  
  46.  (8) 211 - Check for SHIFT/CMDR/CONTROL/ALT/CAPS LOCK pressed.
  47.  
  48.    SHIFT -- 1
  49.    CMDR  -- 2       To check for two or more
  50.    CTRL  -- 4       keys pressed simultaneously
  51.    ALT   -- 8       add these numbers.
  52.    CAPS  -- 16
  53.  
  54.  (9) 241 - Cursor color (0 to 15). Use this when the COLOR command is not
  55. wanted.
  56.  
  57.  (10) 243 - Reverse mode flag. 0 = not on.
  58.  
  59.  (11) 244 - Quote mode flag. 0 = not in quote mode. A quick way to get out
  60. of the quote mode.
  61.  
  62.  (12) 808 - Disable STOP key. 808 is a dangerous thing to POKE on the C-64
  63. and is banned on LOADSTAR. It disables the STOP key but causes all sorts of
  64. unpredictable things (especially faulty saves) later on in the program.
  65. Maybe 808 is okay on the C-128 but I'm too chicken to trust it. Using TRAP
  66. wisely can make the STOP key less troublesome.
  67.  
  68.  (13) 828 - Disable function keys.
  69.  
  70.   POKE828,183 = disable
  71.   POKE828,173 = enable
  72.  
  73.  (14) 842-851 - Keyboard buffer. Same as 631-640 on the C-64. For dynamic
  74. keyboard effects, POKE these values and the computer will act as if the
  75. user has pressed the keys whose values you POKE here. You must also set
  76. location 208 to reflect how many keypresses you want processed.
  77.  
  78.  (15) 862-865 - Line link bitmap. If you find that printing in the
  79. rightmost column has caused subsequent PRINTs to be on the wrong row, do
  80. this  FORI=862TO865,POKEI,0:NEXT  and things will be cleared up. I haven't
  81. found this to be as much a problem on the C-128 as I have on the C-64.
  82.  
  83.  (16) 2594 - Key repeat flag.
  84.  
  85.   128 = all keys repeat
  86.    64 = no keys repeat
  87.   Otherwise only CRSR, SPACE, INST and DELETE repeat
  88.   Default = all keys repeat
  89.  
  90.  (17) SYS52591 - Turn cursor on. Needed if you turn cursor off (below).
  91.  
  92.  (18) SYS52639 - There are times when the damn cursor simply won't go away.
  93. Use this.
  94.  
  95.  (19) 52684 - The path to the VDC chip from BASIC. I've never used it
  96. because CONTROL80 allows me to use PEER and POST (analogous to PEEK and
  97. POKE). Do yourself a favor and use CONTROL80 (from LS 128 #10, #22, #24 or
  98. #25).
  99.  
  100.  (20) 53248-53296 - VIC registers. Same as the C-64! This is handy,
  101. however, BASIC 7.0's sprite commands make things even easier for 40-column
  102. sprite work.
  103.  
  104.  (21) 54272-54300 - SID registers. Same as the C-64. Again, BASIC 7.0's
  105. SOUND and PLAY commands make it unnecessary to deal with the SID chip at
  106. the same low level that the C-64 requires.
  107.  
  108.  (22) 54784-54785 - VDC registers. The docs for CONTROL 80 has a chart of
  109. all 36 registers and some tips for tweaking them.
  110.  
  111.     I'm sure that machine language programmers and BASIC programmers who
  112. are more sophisticated than I would find many more interesting things in
  113. this book, but these are about the only PEEKs, POKEs and SYSes I've ever
  114. used.  Maybe they may help you when you run into a diabolical bug -- and
  115. you will, you will.
  116.  
  117.                       \\\\\ RETURN - Menu \\\\\
  118.  
  119.